﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

using hou_elearning.Entity;
using hou_elearning.Custom;
using System.ServiceModel.Web;

/// <summary>
/// Interface này để khai báo các phương thức của service
/// </summary>
/// <author>liemqv</author>
/// <create>09/05/2012</create>
/// 

[ServiceContract]
public interface IHOULMSService
{
    /// <summary>
    /// Các phương thức của Slide
    /// </summary>
    [OperationContract]
    [WebGet(UriTemplate = "SlideGetAll", ResponseFormat = WebMessageFormat.Json)]
    IList<SlideEntity> SlideGetAll();

    [OperationContract]
    [WebInvoke(Method = "POST", UriTemplate = "SlideGetByPK/{PK_iSlideID}", ResponseFormat = WebMessageFormat.Json)]
    SlideEntity SlideGetByPK(String PK_iSlideID);

    [OperationContract]
    [WebGet(UriTemplate = "SlideInsert/{strSlideJson}", ResponseFormat = WebMessageFormat.Json)]
    Int64 SlideInsert(String strSlideJson);

    [OperationContract]
    [WebGet(UriTemplate = "SlideUpdate/{strSlideJson}", ResponseFormat = WebMessageFormat.Json)]
    bool SlideUpdate(String strSlideJson);

    [OperationContract]
    [WebGet(UriTemplate = "SlideDelete/{PK_iSlideID}", ResponseFormat = WebMessageFormat.Json)]
    bool SlideDelete(String PK_iSlideID);

    /// <summary>
    /// Các phương thức của Trangslide
    /// </summary>
    /// 
    [OperationContract]
    [WebGet(UriTemplate = "TrangslideGetAll", ResponseFormat = WebMessageFormat.Json)]
    IList<TrangslideEntity> TrangslideGetAll();

    [OperationContract]
    [WebGet(UriTemplate = "TrangslideGetByPK/{PK_iTrangslideID}", ResponseFormat = WebMessageFormat.Json)]
    TrangslideEntity TrangslideGetByPK(String PK_iTrangslideID);

    [OperationContract]
    [WebInvoke(Method = "POST", UriTemplate = "TrangslideGetByFK_iSlideID/{FK_iSlideID}", ResponseFormat = WebMessageFormat.Json)]
    IList<TrangslideEntity> TrangslideGetByFK_iSlideID(String FK_iSlideID);

    [OperationContract]
    [WebGet(UriTemplate = "TrangslideInsert/{strTrangslideJson}", ResponseFormat = WebMessageFormat.Json)]
    Int64 TrangslideInsert(String strTrangslideJson);

    [OperationContract]
    [WebGet(UriTemplate = "TrangslideUpdate/{strTrangslideJson}", ResponseFormat = WebMessageFormat.Json)]
    bool TrangslideUpdate(String strTrangslideJson);

    [OperationContract]
    [WebGet(UriTemplate = "TrangslideDelete/{PK_iTrangslideID}", ResponseFormat = WebMessageFormat.Json)]
    bool TrangslideDelete(String PK_iTrangslideID);

    /// <summary>
    /// Các phương thức của Sukienslide
    /// </summary>
    /// 
    [OperationContract]
    [WebGet(UriTemplate = "SukienslideGetAll", ResponseFormat = WebMessageFormat.Json)]
    IList<SukienslideEntity> SukienslideGetAll();

    [OperationContract]
    [WebGet(UriTemplate = "SukienslideGetByPK/{PK_sSukienslideID}", ResponseFormat = WebMessageFormat.Json)]
    SukienslideEntity SukienslideGetByPK(String PK_sSukienslideID);

    [OperationContract]
    [WebInvoke(Method = "POST", UriTemplate = "SukienslideGetByFK_iTrangslideID/{FK_iTrangslideID}", ResponseFormat = WebMessageFormat.Json)]
    IList<SukienslideEntity> SukienslideGetByFK_iTrangslideID(String FK_iTrangslideID);

    [OperationContract]
    [WebGet(UriTemplate = "SukienslideInsert/{strSukienslideJson}", ResponseFormat = WebMessageFormat.Json)]
    Int64 SukienslideInsert(String strSukienslideJson);

    [OperationContract]
    [WebGet(UriTemplate = "SukienslideUpdate/{strSukienslideJson}", ResponseFormat = WebMessageFormat.Json)]
    bool SukienslideUpdate(String strSukienslideJson);

    [OperationContract]
    [WebGet(UriTemplate = "SukienslideDelete/{PK_iSukienslideID}", ResponseFormat = WebMessageFormat.Json)]
    bool SukienslideDelete(String PK_iSukienslideID);

    /// <summary>
    /// Các phương thức của Diemdanh
    /// </summary>
    /// 
    [OperationContract]
    [WebGet(UriTemplate = "DiemdanhGetAll", ResponseFormat = WebMessageFormat.Json)]
    IList<DiemdanhEntity> DiemdanhGetAll();

    [OperationContract]
    [WebGet(UriTemplate = "DiemdanhGetByPK/{PK_sDiemdanhID}", ResponseFormat = WebMessageFormat.Json)]
    DiemdanhEntity DiemdanhGetByPK(String PK_sDiemdanhID);

    [OperationContract]
    [WebInvoke(Method = "POST", UriTemplate = "DiemdanhInsert", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.WrappedRequest)]
    Int64 DiemdanhInsert(String FK_iKhoahocID, String FK_iHocvienID, String FK_iTrangslideID);

    [OperationContract]
    [WebGet(UriTemplate = "DiemdanhUpdate/{strDiemdanhJson}", ResponseFormat = WebMessageFormat.Json)]
    bool DiemdanhUpdate(String strDiemdanhJson);

    [OperationContract]
    [WebGet(UriTemplate = "DiemdanhDelete/{PK_sDiemdanhID}", ResponseFormat = WebMessageFormat.Json)]
    bool DiemdanhDelete(String PK_sDiemdanhID);
    /// <summary>
    /// Thống kê danh sách slide theo người dùng và khóa học
    /// </summary>
    /// 
    [OperationContract]
    [WebInvoke(Method = "POST", UriTemplate = "Thongkekhoahoc", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.WrappedRequest)]
    IList<Thongkekhoahoc> Thongkekhoahoc(String PK_iKhoahocID, String PK_iHocvienID);

    [OperationContract]
    [WebInvoke(Method = "POST", UriTemplate = "Test", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.WrappedRequest)]
    String Test(String sYourName);
    /// <summary>
    /// Khóa học theo XML
    /// </summary>
    /// 
    [OperationContract]
    [WebGet(UriTemplate = "KhoahocGetAllXML", ResponseFormat = WebMessageFormat.Xml)]
    IList<KhoahocEntity> KhoahocGetAllXML();

    [OperationContract]
    [WebInvoke(Method = "POST", UriTemplate = "KhoahocGetByPKXML/{PK_iKhoahocID}", ResponseFormat = WebMessageFormat.Xml)]
    KhoahocEntity KhoahocGetByPKXML(String PK_iKhoahocID);

    [OperationContract]
    [WebInvoke(Method = "POST", UriTemplate = "KhoahocGetByFK_iNguoidungIDXML/{FK_iNguoidungID}", ResponseFormat = WebMessageFormat.Xml)]
    IList<KhoahocEntity> KhoahocGetByFK_iNguoidungIDXML(String FK_iNguoidungID);

    /// <summary>
    /// Bài học theo XML
    /// </summary>
    /// 
    [OperationContract]
    [WebGet(UriTemplate = "BaihocGetAllXML", ResponseFormat = WebMessageFormat.Xml)]
    IList<BaihocEntity> BaihocGetAllXML();

    [OperationContract]
    [WebInvoke(Method = "POST", UriTemplate = "BaihocGetByPKXML/{PK_iBaihocID}", ResponseFormat = WebMessageFormat.Xml)]
    BaihocEntity BaihocGetByPKXML(String PK_iBaihocID);

    [OperationContract]
    [WebInvoke(Method = "POST", UriTemplate = "BaihocGetByFK_iKhoahocIDXML/{FK_iKhoahocID}", ResponseFormat = WebMessageFormat.Xml)]
    IList<BaihocEntity> BaihocGetByFK_iKhoahocIDXML(String FK_iKhoahocID);

    /// <summary>
    /// Slide theo XML
    /// </summary>
    /// 
    [OperationContract]
    [WebGet(UriTemplate = "SlideGetAllXML", ResponseFormat = WebMessageFormat.Xml)]
    IList<SlideEntity> SlideGetAllXML();

    [OperationContract]
    [WebInvoke(Method = "POST", UriTemplate = "SlideGetByPKXML/{PK_iSlideID}", ResponseFormat = WebMessageFormat.Xml)]
    SlideEntity SlideGetByPKXML(String PK_iSlideID);

    [OperationContract]
    [WebInvoke(Method = "POST", UriTemplate = "SlideGetByFK_iBaihocIDXML/{FK_iBaihocID}", ResponseFormat = WebMessageFormat.Xml)]
    IList<SlideEntity> SlideGetByFK_iBaihocIDXML(String FK_iBaihocID);

    /// <summary>
    /// Trang slide
    /// </summary>
    /// 
    [OperationContract]
    [WebGet(UriTemplate = "TrangslideGetAllXML", ResponseFormat = WebMessageFormat.Xml)]
    IList<TrangslideEntity> TrangslideGetAllXML();

    [OperationContract]
    [WebInvoke(Method = "POST", UriTemplate = "TrangslideGetByFK_iSlideIDXML/{FK_iSlideID}", ResponseFormat = WebMessageFormat.Xml)]
    IList<TrangslideEntity> TrangslideGetByFK_iSlideIDXML(String FK_iSlideID);

    /// <summary>
    /// Sự kiện slide
    /// </summary>
    /// 
    [OperationContract]
    [WebGet(UriTemplate = "SukienslideGetAllXML", ResponseFormat = WebMessageFormat.Xml)]
    IList<SukienslideEntity> SukienslideGetAllXML();

    [OperationContract]
    [WebInvoke(Method = "POST", UriTemplate = "SukienslideGetByFK_iTrangslideIDXML/{FK_iTrangslideID}", ResponseFormat = WebMessageFormat.Xml)]
    IList<SukienslideEntity> SukienslideGetByFK_iTrangslideIDXML(String FK_iTrangslideID);

    [OperationContract]
    [WebInvoke(Method = "POST", UriTemplate = "SukienslideGetByFK_iSlideIDXML/{FK_iSlideID}", ResponseFormat = WebMessageFormat.Xml)]
    IList<SukienslideEntity> SukienslideGetByFK_iSlideIDXML(String FK_iSlideID);

}
